<?php
namespace Health\Http\Controllers\Admin;

use Health\Http\Controllers\Admin\BaseController;
use Illuminate\Http\Request;
use EasyWeChat;

class WxController extends BaseController
{
    public function menuEdit()
    {
        return view('admin.wx.menu_edit');
    }

    public function postMenuEdit(Request $request)
    {
        $menu = json_decode($request->input('menu'), true);
        EasyWeChat::menu()->add($menu);
        return redirect('/wx/menu/edit');
    }

}